<template>
  <div class="hetip">
      <div class="back" @click.stop.prevent="hitp($event)">
      	<i class="icon-arrow_lift"></i>
      </div>
			<div class="ba">
				{{istext}}
			</div>
			
  </div>
</template>

<script>

export default {
  name: 'hetip',
  data () {
    return {
        istip:1,
				issclltop:false
    }
  },
	props:{
		istipp:{
			type: Number,
			default: 0
		},
		istext:{
			type:String,
		  default:"你好新鲜"
		}
	}, 
	methods: {
		hitp(event) { //派发一个事件去主页面执行
	  if (this.isDisable) return false;
	     this.isDisable = true
	      console.log("pppp")
	      setTimeout(() => { //防止用户重复点击 https://www.jb51.net/article/139840.htm
					if (!event._constructed) {
						  return;
					}
					this.isDisable = false;
					this.$emit('ishastip', this.istip)
				}, 10)
		},
		isok(){
			// this.issclltop=true
		}
		
	},
	watch: {
		food(newValue, oldValue) {
			console.log("newValue",newValue)
		}
	},

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less"  scoped>
	@import "../../common/stylus/border.css";
	@import "../../common/stylus/url.less";
	@import "../../common/stylus/icon.less";
  .hetip{
		 display: flex;
		 height:40px;
		 line-height: 40px;
		 position: relative;
		 
		 .back{
		 	position: absolute;
		 	top: -3px;
		 	left: 0;
		 	.icon-arrow_lift{
		 		display:block;
		 		padding:  10px;
		 		font-size: 20px;
		 		color: #FFFFFF;
		 	}	
		}
		 .ba{
			  flex: 1;
				justify-content: center;
				text-align: center;
				color: #000101;
				line-height: 40px;
				font-size: 14px;

		 }

	}
</style>
